# +----------------------------------------------------------------------
# | User: zq
# | Version: python3.7
# | Time: 2020-03-07 15:35
# +----------------------------------------------------------------------
import requests

# res = requests.get('http://www.baidu.com')
# print(res.text)
#

#
url = "http://api.99314.com/api/index/pytest"
params = {
    'username' : 'zq',
    'password' : '123456'
}
my_headers = {
    'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36',
    'imooc_uid': '321'
}
res = requests.post(url, data=params, headers=my_headers)
#设置编码
res.encoding= "utf8"
print(res.encoding)
print(res.json())
print(res.headers)
print(res.text)
